public class Main {
    public static void main(String[] args){

        int a=1;
        int b=2;

        System.out.println(a==1 && b==2);//左右都为真，结果为真
        System.out.println(a==1 && b!=2);//右为假，结果为假
        System.out.println(a!=1 && b==2);//左为假，结果为假
        System.out.println(a!=1 && b!=2);//左右都为假，结果为假

        int c=4;
        int d=5;

        System.out.println(c==4||d==5);//左右都为真，结果为真
        System.out.println(c==4||d!=5);//左为真，结果为真
        System.out.println(c!=4||d==5);//右为真，结果为真
        System.out.println(c!=4||d!=5);//左右都为假，结果为假

        int e=6;

        System.out.println(!(e!=6));
        System.out.println(!(e==6));

    }
}
